// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLName_ptr ;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr*;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor*;

// import java.util.ArrayList;
// import java.util.std::list;
#pragma once
#include <string>
#include <list>
#include "../SQLStatementImpl.h"
#include "SQLAssignItem.h"
#include "SQLExprTableSource.h"

class SQLASTVisitor;

class SQLTruncateStatement : public SQLStatementImpl
{
public:
  SQLExprTableSource_list_ptr tableSources;
  BOOL_ptr purgeSnapshotLog;
  BOOL_ptr only;
  BOOL_ptr restartIdentity;
  BOOL_ptr cascade;

  // db2
  BOOL_ptr dropStorage;
  BOOL_ptr reuseStorage;
  BOOL_ptr immediate;
  BOOL_ptr ignoreDeleteTriggers;
  BOOL_ptr restrictWhenDeleteTriggers;
  BOOL_ptr continueIdentity;
  BOOL_ptr ifExists;
  SQLAssignItem_list_ptr partitions;

  // adb
  BOOL_ptr partitionAll;
  std::shared_ptr<std::list<SQLIntegerExpr_ptr>> partitionsForADB;

  SQLTruncateStatement();

  SQLTruncateStatement(DbType_ptr  dbType);
  SHAREDOBJECT(SQLTruncateStatement);

  SQLExprTableSource_list_ptr getTableSources();

  void setTableSources(SQLExprTableSource_list_ptr tableSources);

  void addTableSource(SQLName_ptr name);

  void accept0(SQLASTVisitor_ptr visitor);

  BOOL_ptr isPurgeSnapshotLog();

  void setPurgeSnapshotLog(BOOL_ptr purgeSnapshotLog);

  BOOL_ptr isOnly();

  void setOnly(BOOL_ptr only);

  BOOL_ptr getRestartIdentity();

  void setRestartIdentity(BOOL_ptr restartIdentity);

  BOOL_ptr getCascade();

  void setCascade(BOOL_ptr cascade);

  BOOL_ptr isDropStorage();

  void setDropStorage(BOOL_ptr dropStorage);

  BOOL_ptr isReuseStorage();

  void setReuseStorage(BOOL_ptr reuseStorage);

  BOOL_ptr isImmediate();

  void setImmediate(BOOL_ptr immediate);

  BOOL_ptr isIgnoreDeleteTriggers();

  void setIgnoreDeleteTriggers(BOOL_ptr ignoreDeleteTriggers);

  BOOL_ptr isRestrictWhenDeleteTriggers();

  void setRestrictWhenDeleteTriggers(BOOL_ptr restrictWhenDeleteTriggers);

  BOOL_ptr isContinueIdentity();

  void setContinueIdentity(BOOL_ptr continueIdentity);

  SQLExprTableSource_list_ptr getChildren();

  BOOL_ptr isIfExists();

  void setIfExists(BOOL_ptr ifExists);

  SQLAssignItem_list_ptr getPartitions();

  BOOL_ptr isPartitionAll();

  void setPartitionAll(BOOL_ptr partitionAll);

  std::shared_ptr<std::list<SQLIntegerExpr_ptr>> getPartitionsForADB();
};
